---
apiVersion: v1
kind: Secret
metadata:
  name: opensearch-internal-users
  namespace: es
type: Opaque
stringData:
  internal_users.yml: |
    ---
    # Artur's version
    # This is the internal user database
    # The hash value is a bcrypt hash and can be generated with plugin/tools/hash.sh
    
    _meta:
      type: "internalusers"
      config_version: 2
    
    # Define your internal users here
    
    ## Demo users
    
    admin:
      hash: "$2a$05$TXDbjNIQRPPmgEqOutZ9Oe0QEswgQa64Wye9X3SfBjITHYvioOC5."
      reserved: true
      backend_roles:
      - "admin"
      description: "Demo admin user"
    
    anomalyadmin:
      hash: "$2y$12$TRwAAJgnNo67w3rVUz4FIeLx9Dy/llB79zf9I15CKJ9vkM4ZzAd3."
      reserved: false
      opendistro_security_roles:
      - "anomaly_full_access"
      description: "Demo anomaly admin user, using internal role"
    
    kibanaserver:
      hash: "$2a$05$79G/3geYJiCqBm/lhTMiXOVZMwRyD/Nuh6zEYLsXeWmBlGIFmrkfO"
      reserved: true
      description: "Demo OpenSearch Dashboards user"
    
    kibanaro:
      hash: "$2a$12$JJSXNfTowz7Uu5ttXfeYpeYE0arACvcwlPBStB1F.MI7f0U9Z4DGC"
      reserved: false
      backend_roles:
      - "kibanauser"
      - "readall"
      attributes:
        attribute1: "value1"
        attribute2: "value2"
        attribute3: "value3"
      description: "Demo OpenSearch Dashboards read only user, using external role mapping"
        
    logstash:
      hash: "$2a$12$u1ShR4l4uBS3Uv59Pa2y5.1uQuZBrZtmNfqB3iM/.jL0XoV9sghS2"
      reserved: false
      backend_roles:
      - "logstash"
      description: "Demo logstash user, using external role mapping"
    
    readall:
      hash: "$2a$12$ae4ycwzwvLtZxwZ82RmiEunBbIPiAmGZduBAjKN0TXdwQFtCwARz2"
      reserved: false
      backend_roles:
      - "readall"
      description: "Demo readall user, using external role mapping"
    
    snapshotrestore:
      hash: "$2y$12$DpwmetHKwgYnorbgdvORCenv4NAK8cPUg8AI6pxLCuWf/ALc0.v7W"
      reserved: false
      backend_roles:
      - "snapshotrestore"
      description: "Demo snapshotrestore user, using external role mapping"
